﻿//---------------------------------------------------------------------------------
// Copyright 2011 Microsoft Corporation
// Licensed under the Microsoft Public License (MS-PL) (the "License"); 
// You may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.opensource.org/licenses/ms-pl.html
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR 
// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, 
// INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR 
// CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
// MERCHANTABLITY OR NON-INFRINGEMENT. 
// See the Microsoft Public License (MS-PL) for the specific language governing 
// permissions and limitations under the License.
//---------------------------------------------------------------------------------

using System.Runtime.Serialization;

namespace Microsoft.Telco.Web.Contracts
{

	/// <summary>
	/// Fault indicating a failure with the service call.
	/// </summary>
	[DataContract(Namespace = Namespaces.V1)]
	public class TelcoFault
	{

		/// <summary>
		/// Initializes a new instance of the <see cref="TelcoFault" /> class.
		/// </summary>
		public TelcoFault()
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="TelcoFault" /> class.
		/// </summary>
		/// <param name="message">The message.</param>
		public TelcoFault(string message)
		{
			this.Message = message;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="TelcoFault" /> class.
		/// </summary>
		/// <param name="message">The message.</param>
		/// <param name="code">The code.</param>
		public TelcoFault(string message, string code) : this(message)
		{
			this.Code = code;
		}

		/// <summary>
		/// Gets or sets the fault code.
		/// </summary>
		/// <value>The fault code.</value>
		[DataMember]
		public string Code { get; set; }

		/// <summary>
		/// Gets or sets the message.
		/// </summary>
		/// <value>The message.</value>
		[DataMember]
		public string Message { get; set; }

	}


}
